"""
# -*- coding: utf-8 -*-
Time    : 2025/7/22 下午5:08
Author  : Micah
File    : test_request.py
Function:
"""
import pytest
import smtplib

@pytest.fixture(scope="module", params=["smtp.163.com", "smtp.126.com", "mail.python.org"])
def smtp_connection_params(request):
    server = request.param
    with smtplib.SMTP(server, 587, timeout=5) as smtp_connection:
        yield smtp_connection


def test_params(smtp_connection_params):
    response, msg = smtp_connection_params.ehlo()
    assert response == 250



